package com.huakang.controller;

import com.huakang.entity.Department;
import com.huakang.service.DeptService;
import com.huakang.utils.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author{小熊}
 * @Date2025/1/13 14:27
 */
@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    @GetMapping("/getAll")
    public ResultVo getAll(){
        List<Department> list = deptService.getAll();
        return ResultVo.success("查询成功",list);
    }

}
